#!/bin/bash

#空的部署脚本，只作为程序逻辑演示，具体发布的命令需要自己补充

# 修改APP_NAME为云效上的应用名
APP_NAME=application
PROG_NAME=$0
ACTION=$1

usage() {
    echo "Usage:  {start|stop|restart}"
    exit 2
}
health_check() {
    echo "checking health"
}
start_application() {
    echo "starting java process"
    # nohup java -jar ${JAR_NAME} > ${JAVA_OUT} 2>&1 &
    echo "started java process"
}
stop_application() {
   echo "stopping java process"
}
start() {
    start_application
    health_check
}
stop() {
    stop_application
}
case "$ACTION" in
    start)
        start
    ;;
    stop)
        stop
    ;;
    restart)
        stop
        start
    ;;
    *)
        usage
    ;;
esac
